<template>
    <div>
        <p>计数器：{{ count }}</p>
        <button @click="handleIncrement">++</button>
    </div>
</template>
<script setup>
import {storeToRefs} from 'pinia';
import {useCounterStore} from '../stores/counter';
const couterStore = useCounterStore();
// const {count} = storeToRefs(couterStore);
const {increment,count} = couterStore;
const handleIncrement = () => {
    // couterStore.count++;
    increment(5);
}
</script>